get host ip address asp.net core

43

get host ip address asp.net core -

var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;

Comments

Submit
0 Comments